<div class="pageContent">
        <if condition="isset($info)">
            <form method="post" action="__URL__/update" enctype="multipart/form-data"  class="pageForm required-validate" onsubmit="return iframeCallback(this, dialogAjaxDone);">
        <else />
            <form method="post" action="__URL__/insert" enctype="multipart/form-data"  class="pageForm required-validate" onsubmit="return iframeCallback(this, dialogAjaxDone);">
        </if>
        <div class="pageFormContent" layoutH="56">
            <div style="width:100%;float:left;">
                <label style="font-size:12px;margin-left:10px;">商品名称：</label>
                <input name="productName" type="text" size="30" value="{$info.productName}" class="required"/>
            </div>
            <div style="margin-top: 10px;width:100%;float:left;">
                <label style="font-size:12px;margin-left:10px;">商品库存：</label>
                <input name="total" type="text" size="30" value="{$info.total}" class="required alphanumeric"/>
            </div>
            <div style="margin-top: 10px;width:100%;float:left;">
                <label style="font-size:12px;margin-left:10px;">商品状态：</label>
                <select  name="status"  style="width:100px;float:left;">
                    <option value="0" <?php  if($info["status"] == 0){ echo "selected='true'"; } ?> >正常</option>
                    <option value="1" <?php  if($info["status"] == 1){ echo "selected='true'"; } ?>>下架</option>
                 </select>
            </div>
            <div style="margin-top: 10px;width:100%;float:left;">
                <label style="font-size:12px;margin-left:10px;">商品价格：</label>
                <input name="price" type="text" size="30" value="{$info.price}" class="required "/>
            </div>
            <div style="margin-top: 10px;width:100%;float:left;">
                <label style="font-size:12px;margin-left:10px;">销售价格：</label>
                <input name="salePrice" type="text" size="30" value="{$info.salePrice}" class="required "/>
            </div>
            <div style="margin-top: 10px;width:100%;float:left;">
                <label style="font-size:12px;margin-left:10px;">上传缩略图：</label>
                    <?php  if(!empty($info["thumb"])) { ?>
                        <img src="__PUBLIC__/Uploads/{$info.thumb}" style="float:left:width:50px;height:50px;"/>
                    <?php  } ?>
                    <input type="file" name="img" />
            </div>
            <div style="margin-top: 10px;width:100%;float:left;">
                <label style="font-size:12px;margin-left:10px;">上传bannar图：</label>
                    <?php  if(!empty($info["bannar"])) { ?>
                        <img src="__PUBLIC__/Uploads/{$info.thumb}" style="float:left:width:50px;height:50px;"/>
                    <?php  } ?>
                    <input type="file" name="imgs" />
            </div>
            <div style="margin-top: 10px;width:100%;float:left;">
                <label style="font-size:12px;margin-left:10px;">商品描述详情：</label>
                <textarea tools="full" class="kindeditor"name="productDesc" style="width:100%; height:300px;">
                    {$info.productDesc}
                </textarea>
            </div>  
            <div style="margin-top: 10px;width:100%;float:left;">
                <label style="font-size:12px;margin-left:10px;">赠送规则：</label>
                <select  name="presentId"  style="width:100px;float:left;">
                    <option value="0">请选择</option>
                    <volist name="presenter_list" id="vo">
                        <option value="{$vo.id}" <?php  if($info["presentId"] == $vo["id"]){ echo "selected='true'"; } ?> >{$vo.presentName}</option>
                    </volist>
                 </select>
            </div>                    
        </div>
        <div class="formBar">        
        <ul>
            <if condition="in_array('update', $privilegelist)">
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <input type="hidden" name="id" value="{$info.id}"/>
                        <button type="submit">保存</button>

                    </div>
                </div>
            </li>
            <li>
                <div class="button">
                    <div class="buttonContent">
                        <button type="button" class="close">取消</button>
                    </div>
                </div>
            </li>
            </if>
        </ul>
        </div>
    </form>
</div>
